const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('tb_conpermit_single1', {
    ID: {
      type: DataTypes.STRING(255),
      allowNull: false,
      primaryKey: true,
      comment: "ID"
    },
    item_num: {
      type: DataTypes.STRING(255),
      allowNull: false,
      comment: "事项编号"
    },
    single_proj_num: {
      type: DataTypes.STRING(255),
      allowNull: false,
      comment: "单体编号"
    },
    single_proj_name: {
      type: DataTypes.STRING(255),
      allowNull: false,
      comment: "工程名称"
    },
    prj_num: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "所属项目id"
    },
    prj_name: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "项目名称"
    },
    prj_type: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "工程性质"
    },
    single_prj_size: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "单体建设规模"
    },
    bulid_area: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "建筑面积"
    },
    build_length: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "建筑长度"
    },
    upper_bulid_area: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "地上建筑面积"
    },
    upper_bulid_length: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "地上建筑长度"
    },
    under_bulid_area: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "地下建筑面积"
    },
    under_bulid_length: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "地下建筑长度"
    },
    upper_floors: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "地上层数"
    },
    under_floors: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "地下层数"
    },
    S_CREATETIME: {
      type: DataTypes.DATE,
      allowNull: false,
      defaultValue: Sequelize.Sequelize.literal('CURRENT_TIMESTAMP'),
      comment: "S_CREATETIME"
    },
    S_LAST_UPDATETIME: {
      type: DataTypes.DATE,
      allowNull: false,
      defaultValue: "0000-00-00 00:00:00",
      comment: "S_LAST_UPDATETIME"
    },
    STRUCT_SYS_CODE: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "结构体系"
    },
    SINGLE_HEIGHT: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "单体高度"
    },
    GuiHuaXuKeZhengHao: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "规划许可证号"
    },
    BaoJianJinDu: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "报监进度"
    },
    ShiFuTiQianJieRuGongCheng: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "是否提前介入工程"
    }
  }, {
    sequelize,
    tableName: 'tb_conpermit_single1',
    hasTrigger: true,
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "ID" },
        ]
      },
    ]
  });
};
